import time
from time import sleep
from selenium.webdriver.support.select import Select
from Finance_fun.base.base import Base
from Finance_fun import page

"""以下为交易界面操作"""
class Page_Transaction(Base):
    # 点击交易记录
    def page_click_transaction_record(self):
        self.base_click(page.jy_record_link)

    # 选择起始日期
    def check_start_date(self,start_date):
        self.base_input(page.start_date,start_date)

    # 选择结束日期
    def check_end_date(self,end_date):
        # self.base_click(page.end_date)
        self.base_input(page.end_date,end_date)

    # 点击筛选按钮
    def click_filter_btn(self):
        self.base_click(page.filter_btn)

    # 点击充值记录按钮
    def click_cz_btn(self):
        self.base_click(page.cz_record_button)

    # 点击提现记录按钮
    def click_tx_btn(self):
        self.base_click(page.tx_record_button)

    # 选择开始日期
    def check_start_date1(self, start_date1):
        self.base_input(page.start_date1, start_date1)

    # 点击登录链接
    def page_click_login_link(self):
        self.base_click(page.login_link)

    # 输入登录手机号
    def page_input_login_phone(self, phone):
        self.base_input(page.login_phone, phone)

    # 输入登录密码
    def page_input_login_password(self, password):
        self.base_input(page.login_password, password)

    # 点击登录按钮
    def page_click_login_btn(self):
        self.base_click(page.login_btn)

    # 集成登录操作
    def page_login(self, phone, password):
        self.page_input_login_phone(phone)
        self.page_input_login_password(password)
        self.page_click_login_btn()
        sleep(1)